package feed;

public class Pigeon {
	private String food;
	private String name;
	private int num;
	static int count ;
	static {
		count=0;
	}
	public Pigeon(){
		
	}
	public Pigeon(String food,String name){
		this.food=food;
		this.name=name;
		count++;
		setNum(count);
	}
	public String getFood() {
		return food;
	}
	public void setFood(String food) {
		this.food = food;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getNum() {
		return num;
	}
	public void setNum(int num) {
		this.num = num;
	}
	public void eat(){
		System.out.println("the pigeon: "+this.num+this.name+" eat "+this.food);
	}
}
